|
Neurosis Engine
|
00001 00002 // Neurosis Engine - LP23.com 00003 // Copyright © Luigi Pino. All rights reserved. 00004 00005 /***************************************************************************/ 00006 00007 #ifndef _NEUROSIS_ENGINE_CUSTOM_H_ 00008 #define _NEUROSIS_ENGINE_CUSTOM_H_ 00009 00010 /***************************************************************************/ 00011 00012 class color3 { 00013 public: 00014 color3(float initR = 0.0f, float initG = 0.0f, float initB = 0.0f); 00016 ~color3(); 00017 00018 void operator= (color3 rhs); 00019 bool operator== (color3 rhs); 00021 bool operator!= (color3 rhs); 00022 00023 float r, g, b; 00024 }; 00025 00026 /***************************************************************************/ 00027 00028 class float2 { 00029 public: 00030 float2(float initX = 0.0f, float initY = 0.0f); 00032 ~float2(); 00033 00034 float2 operator+ (float2 rhs); 00035 float2 operator- (float2 rhs); 00036 float2 operator* (float rhs); 00037 float2 operator* (float2 rhs); 00038 float2 operator/ (float rhs); 00039 float2 operator/ (float2 rhs); 00040 void operator= (float2 rhs); 00041 bool operator== (float2 rhs); 00043 bool operator!= (float2 rhs); 00044 00046 float Length(); 00047 00048 float x, y; 00049 }; 00050 00051 /***************************************************************************/ 00052 00053 class float3 { 00054 public: 00055 float3(float initX = 0.0f, float initY = 0.0f, float initZ = 0.0f); 00057 ~float3(); 00058 00059 float3 operator+ (float3 rhs); 00060 float3 operator- (float3 rhs); 00061 float3 operator* (float rhs); 00062 float3 operator* (float3 rhs); 00063 float3 operator/ (float rhs); 00064 float3 operator/ (float3 rhs); 00065 void operator= (float3 rhs); 00066 bool operator== (float3 rhs); 00068 bool operator!= (float3 rhs); 00069 00071 float Length(); 00073 void Normal(float3 *point1, float3 *point2, float3 *point3); 00075 void Normalize(); 00077 void Set(float length, float rotationX, float rotationZ); 00079 void Set(float rotationX, float rotationZ); 00081 void Set(float length); 00082 00083 float x, y, z; 00084 }; 00085 00086 /***************************************************************************/ 00087 00088 class int2 { 00089 public: 00090 int2(int initX = 0, int initY = 0); 00092 ~int2(); 00093 00094 int2 operator+ (int2 rhs); 00095 int2 operator- (int2 rhs); 00096 int2 operator* (int rhs); 00097 int2 operator* (int2 rhs); 00098 int2 operator/ (int rhs); 00099 int2 operator/ (int2 rhs); 00100 void operator= (int2 rhs); 00101 bool operator== (int2 rhs); 00103 bool operator!= (int2 rhs); 00104 00105 int x, y; 00106 }; 00107 00108 /***************************************************************************/ 00109 00110 class int3 { 00111 public: 00112 int3(int initX = 0, int initY = 0, int initZ = 0); 00114 ~int3(); 00115 00116 int3 operator+ (int3 rhs); 00117 int3 operator- (int3 rhs); 00118 int3 operator* (int rhs); 00119 int3 operator* (int3 rhs); 00120 int3 operator/ (int rhs); 00121 int3 operator/ (int3 rhs); 00122 void operator= (int3 rhs); 00123 bool operator== (int3 rhs); 00125 bool operator!= (int3 rhs); 00126 00127 int x, y, z; 00128 }; 00129 00130 /***************************************************************************/ 00131 #endif
1.7.6.1